package com.zhu.ttwords.presenter;

import com.zhu.ttwords.TTWORDS;
import com.zhu.ttwords.model.IRegisterModel;
import com.zhu.ttwords.model.RegisterModel;
import com.zhu.ttwords.view.activity.IRegisterActivity;

/**
 * Created by KnightYe on 2015/4/8.
 */
public class RegisterPresenter {
    IRegisterActivity activity;
    IRegisterModel model;

    public RegisterPresenter(IRegisterActivity activity) {
        this.activity = activity;
        this.model = new RegisterModel();
    }

    public void registAction(String username, String password) {
        model.registUser(username,password);
        //todo 注册,返回一个注册结果
        activity.showRegistResult(TTWORDS.TRANS_SUCCESS);
    }
}
